<template>
    <div>
        <div class="van-dropdown-menu__bar">
            <div role="button" v-for="(item, index) in props.menuList" :key="item.value + index"
                class="van-dropdown-menu__item van-haptics-feedback">
                <span class="van-dropdown-menu__title" @click="changeList(item)">
                    <div class="van-ellipsis" :class="{ 'activeClass': item.checked }">{{ item.text }}</div>
                </span>
            </div>
        </div>
    </div>
</template>

<script setup>
import { defineEmits } from 'vue'
const props = defineProps({
    menuList: { //menuList {Array} 菜单列表
        type: Array,
        default: () => []
    },
})
const emit = defineEmits(['updata'])
const changeList= (item) => {
    emit("change",item)
}
</script>

<style lang="scss" scoped>
.activeClass {
    color: var(--red-color);
}
</style>